package chapter06;

/**
 * Created by V5470-I5 on 2016/3/24.
 */
import static java.lang.System.out;
public class Game {
    public static void main(String[] args){
        play(Action.RIGHT);
        play(Action.UP);

    }
    public static void play(int action){
        switch (action){
            case Action.STOP:
                out.println("播放停止动画");
                break;
            case Action.RIGHT:
                out.println("播放向右动画");
                break;
            case Action.LEFT:
                out.println("播放向左动画");
                break;
            case Action.UP:
                out.println("播放向上动画");
                break;
            case Action.DOWN:
                out.println("播放向下动画");
                break;
            default:
                out.println("无");
        }
    }
}
